import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    component: () => import('@/views/Login')
  },

  // Aiker Ai 客户端
  {
    path: '/aikeai',
    name: "Aikeai",
    redirect: '/aikeai/databoard',
    component: () => import('@/views/Aikeai'),
    children: [
      {
        path: '/aikeai/databoard',
        name: 'DataBoard',
        component: () => import('@/views/Aikeai/DataBoard')
      },

      {
        path: '/aikeai/accountmanagement',
        name: 'AccountManagement',
        component: () => import('@/views/Aikeai/AccountManagement')
      },

      {
        path: '/aikeai/materialmanagement',
        name: 'MaterialManagement',
        component: () => import('@/views/Aikeai/MaterialManagement')
      },

      {
        path: '/aikeai/chatmanagement',
        name: 'ChatManagement',
        component: () => import('@/views/Aikeai/ChatManagement')
      },

      {
        path: '/aikeai/createpublication',
        name: 'CreatePublication',
        component: () => import('@/views/Aikeai/CreatePublication')
      },

      {
        path: '/aikeai/quickfollow',
        name: 'QuickFollow',
        component: () => import('@/views/Aikeai/QuickFollow')
      },

      {
        path: '/aikeai/likecomments',
        name: 'LikeComments',
        component: () => import('@/views/Aikeai/LikeComments')
      },

      {
        path: '/aikeai/groupmarketing',
        name: 'GroupMarketing',
        component: () => import('@/views/Aikeai/GroupMarketing')
      },

      {
        path: '/aikeai/taskmanagement',
        name: 'TaskManagement',
        component: () => import('@/views/Aikeai/TaskManagement')
      },

    ]
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  // history: createWebHashHistory(process.env.BASE_URL),
  routes
})

export default router
